package com.zb.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/7/24 0024
 **/
@Data
@ApiModel("组织人员实体")
public class EmpVo {
    @ApiModelProperty(value = "人员ID，新增时不必传，修改时必传", example = "")
    private Long id;

    @ApiModelProperty(value = "人员账号ID", example = "0")
    private Long accountId;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "手机号格式错误！")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;

    @ApiModelProperty(value = "密码")
    private String password;

    @NotBlank(message = "姓名不能为空")
    @Length(max = 100, message = "账号名称字符长度限制在100个以内")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;

    @ApiModelProperty(value = "昵称")
    @Length(max = 100, message = "账号名称字符长度限制在100个以内")
    private String nickname;

    @ApiModelProperty(value = "是否离职：false-否，true-是", required = true, example = "false")
    private Boolean depart;

    @NotNull(message = "所属组织不能为空")
    @ApiModelProperty(value = "组织ID集合", required = true)
    private Long organizeId;

    @NotNull(message = "角色不能为空")
    @ApiModelProperty(value = "角色ID", required = true)
    private Long roleId;
}
